package com.i2works.smartluolong.web.service.user;


import com.i2works.smartluolong.utils.basecommon.BaseCommonService;
import com.i2works.smartluolong.utils.entity.Result;
import com.i2works.smartluolong.utils.exception.ServiceException;
import com.i2works.smartluolong.web.entity.common.SelectDO;
import com.i2works.smartluolong.web.entity.user.UserAccountDO;
import com.i2works.smartluolong.web.entity.user.UserAccountQuery;
import com.i2works.smartluolong.web.entity.user.UserAccountVO;
import com.i2works.smartluolong.web.entity.user.UserLoginVO;

import java.util.List;
import java.util.Map;

/**
 * 用户基础表业务实现接口
 *
 * @author koal koal@vip.qq.com
 * @date 2015年11月3日 下午10:59:18
 */
public interface IUserAccountService extends BaseCommonService<UserAccountQuery, UserAccountDO> {

    /**
     * app用户登录
     */
    Result queryAppLoginUser(UserLoginVO userLogin) throws ServiceException;

    /**
     * 更新用户
     */
    void update(UserAccountDO userAccountDO) throws ServiceException;
    /**
     * 根据手机号更新用户
     */
    void updateByPhone(UserAccountDO userAccountDO) throws ServiceException;


    /**
     * 添加WEB注册用户
     */
    Integer saveRegisterUser(UserAccountDO userAccountDO) throws ServiceException;

    /**
     * 更新用户密码
     */
    void updatePassword(UserAccountDO userAccountDO) throws ServiceException;

    /**
     * 批量更新会员密码
     */
    void updateBatchPassword(Map map) throws ServiceException;

    /**
     * 查询一个普通用户（登陆）
     */
    UserAccountDO queryLoginUser(String value) throws ServiceException;

    /**
     * 查询用户详细列表
     */
    List<UserAccountVO> queryUserDetailsList(UserAccountQuery query) throws ServiceException;

    /**
     * 查询用户详细列表总量
     */
    Integer queryUserDetailsCount(UserAccountQuery query) throws ServiceException;


    /**
     * 查询用户详细列表(后台API)
     */
    List<UserAccountVO> queryUserInfoApiList(UserAccountQuery query) throws ServiceException;

    /**
     * 查询用户详细列表总量(后台API)
     */
    Integer queryUserInfoApiCount(UserAccountQuery query) throws ServiceException;

    /**
     * 查询某会员的角色列表
     */
    List<SelectDO> queryRoleSelect(Integer userId) throws ServiceException;

}
